<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>PutFiles</title>
<meta http-equiv="Content-Type" Content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="../../styles/styles.css">
<script language="javascript" src='../links.js' type="text/javascript"></script>
</head>
<body>

<h1>PutFiles</h1>
<div class=navbar>
<a href="../index.html">main</a> |
<a href="index.html">exported functions</a>
</div>

<div class=shortdescr>
The <dfn>PutFiles</dfn> function is called to put files to the file system emulated by the plugin.
(FAR to plugin: <em>"those files are for you, you should place then on your panel"</em>).
</div>

<pre class=syntax>
int WINAPI PutFiles(
  HANDLE hPlugin,
  struct PluginPanelItem *PanelItem,
  int ItemsNumber,
  int Move,
  int OpMode
);
</pre>
<h3>Parameters</h3>
<div class=descr>
  <div class=dfn>hPlugin</div>
  <div class=dfndescr>Plugin handle returned by <a href="openplugin.html">OpenPlugin</a>
    or <a href="openfileplugin.html">OpenFilePlugin</a>.</div>

  <div class=dfn>PanelItem</div>
  <div class=dfndescr>Points to an array of
    <a href="../structures/pluginpanelitem.html">PluginPanelItem</a> structures.
    Each structure describes a file to put.</div>

  <div class=dfn>ItemsNumber</div>
  <div class=dfndescr>Number of elements in the <i>PanelItem</i> array.</div>

  <div class=dfn>Move</div>
  <div class=dfndescr>If zero, files should be copied, if nonzergo - moved.</div>

  <div class=dfn>OpMode</div>
  <div class=dfndescr>Combination of the <a href="../defs/operation_mode.html">operation mode</a>
    flags. This function should be ready to process OPM_SILENT flag.
    Also it can process OPM_DESCR.
    <p>If OPM_SILENT is not set, you can ask the user for confirmation
    and allow to edit destination path.
  </div>
</div>

<h3>Return value</h3>
<div class=descr>
If the function succeeds, the return value must be 1 or 2. If the return value is 1, FAR tries to
position the cursor to the most recently created file on the active panel. If the plugin returns 2,
FAR does not perform any positioning operations. If the function fails, 0 should be returned. If
the function was interrupted by the user, it should return -1.
</div>

<h3>Remarks</h3>
<div class=descr>
<ol>
<li>If the operation has failed, but part of the files was successfully processed, the plugin can
    remove selection only from the processed files. To perform it, plugin should clear the
    <a href="../structures/pluginpanelitem.html#PPIF_SELECTED">PPIF_SELECTED</a> flag for processed
    items in the <i>PluginPanelItem</i> list passed to function.
</ol>
</div>

<div class=see>See also:</div><div class=seecont>
<a href="getfiles.html">GetFiles</a>,
<a href="../service_functions/getdirlist.html">GetDirList</a>,
<a href="../service_functions/getplugindirlist.html">GetPluginDirList</a>

</div>

</body>
</html>
